package com.heima.day527_方法;

public class getMini {
            //求数组中的最小值
    public static void main(String[] args) {
        //给出静态数组
        int[]arr={8,6,4,9,2,7,3};
        System.out.println(getMini(arr));
    }
    public static int getMini(int []arr){
            int mini=arr[0];
        for (int i = 0; i < arr.length; i++) {
                if (mini>arr[i]){
                    mini=arr[i];
                }
        }
        return mini;
    }


}
